import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import NotFoundComponent from '@/components/NotFoundComponent'
import Login from '../view/login'
import Header from '../view/header'


Vue.use(Router)

//定义路由参数
export const constantRouterMap =[
  {
    path:'/',
    name:'登陆',
    component:Login,
    hidden:true
  },
  {
    path:'/hello',
    name:'你好世界',
    component:HelloWorld,
    hidden:true
  },
  {
    path:'/head',
    name:'头组件',
    component:Header,
    hidden:true
  },
  {
    path: '/404',
    component: NotFoundComponent,
    hidden:true
  }
]

//组装路由
export default new Router({
  routes: constantRouterMap,
  mode:'hash'
  // mode: 'history'//路由history模式，使url中不会有#
})
